package com.buaa.aimall.goodsModule.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.buaa.aimall.goodsModule.Enum.GoodsTypeEnum;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

@TableName(value = "coupon")
@Data
@Builder
public class CouponEntity {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("fk_user")
    private String user;

    @TableField("discount")
    private int discount;

    @TableField("expiration_time")
    private LocalDateTime expirationTime;

    @TableField("usage_times")
    private int usageTimes;

    @TableField("usefor")
    private GoodsTypeEnum usefor;

    @TableField("external_platform")
    private String externalPlatform;
}
